package com.example.book_recommend.dao;

import com.example.book_recommend.entity.Role;
import com.example.book_recommend.entity.User;
import com.example.book_recommend.entity.UserRoleSimple;

import java.util.ArrayList;
import java.util.List;

public interface UserMapper {
    int deleteByPrimaryKey(Integer userId);

    int insert(User record);

    int insertSelective(User record);

    User selectByPrimaryKey(Integer userId);

    int updateByPrimaryKeySelective(User record);

    int updateByPrimaryKey(User record);

    User selectByUsername(String username);

    List<User> selectByPage(Integer page, Integer size);

    int countNumber();

    List<UserRoleSimple> selectUserRoleSimple(Integer page, Integer size, String username);

    ArrayList<User> selectAllAges();

}